Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent demo data from being created on edited tables #1005

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

vsgoulart
Copy link
Contributor

With the table component we added the concept of adding demo data to the new component, this data was being added when importing forms into the modeler.
This PR prevents this from happening and only adds the demo data when the schema matches with the demo data

Closes #997

  • This PR adds a new form-js element or visually changes an existing component.

@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 25, 2024
@github-actions github-actions bot temporarily deployed to demo-997-demo-data January 26, 2024 05:36 Destroyed
*
* @param {Field} field
*/
generateInitialDemoData: (field) => {
Copy link
Contributor

@Skaiir Skaiir Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, let's be careful with these kinds of changes. Our config object is tied in with the custom component framework and should be treated more or less as public API. Of course we're never obligated but changing how it's structured is something we should not do often.

I highly doubt anyone was using this already, considering how unique this stuff is, but this a breaking change if we were very strict about it.

Maybe it's worth annotating this as experimental, so that we can be safe in the future if we do decide to remove it entirely (which I believe will happen when we have more robust ways of doing demo data).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or moving it to an experimental sub-object, which should get the point across 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Skaiir I added the @experimental tag

@github-actions github-actions bot temporarily deployed to demo-997-demo-data January 29, 2024 17:41 Destroyed
@vsgoulart vsgoulart requested a review from Skaiir January 29, 2024 17:41
@github-actions github-actions bot temporarily deployed to demo-997-demo-data January 30, 2024 06:22 Destroyed
@Skaiir Skaiir merged commit 9b0649c into develop Jan 30, 2024
13 of 14 checks passed
@Skaiir Skaiir deleted the 997-demo-data branch January 30, 2024 06:37
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table component demo data is being added when importing an edited table
3 participants